﻿using System;
using BLL;
using Utils;


namespace UI.ModEmployee
{
    public partial class EmpStatisticDetail : System.Web.UI.Page
    {
        string gvCaption = "";
        string searchParam = "";
        string param1 = "";
        string param2 = "";
        string param3 = "";
        string param4 = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Params["GvCaption"] != null)
                gvCaption = Request.Params["GvCaption"].ToString();
            if (Request.Params["SearchParam"] != null)
                searchParam = Request.Params["SearchParam"].ToString();
            if (Request.Params["Param1"] != null) param1 = Request.Params["Param1"].ToString();
            if (Request.Params["Param2"] != null) param2 = Request.Params["Param2"].ToString();
            if (Request.Params["Param3"] != null) param3 = Request.Params["Param3"].ToString();
            if (Request.Params["Param4"] != null) param4 = Request.Params["Param4"].ToString();
            if (!IsPostBack)
            {
                gvList.DataSource=
                new EmployeeBiz().GetStaticDetail(gvCaption, searchParam, param1, param2, param3, param4,false,"Show");
                gvList.DataBind();
            }
        }

        protected void btnExcel_Click(object sender, EventArgs e)
        {
            ExcelUtility.ExportDsToXls(this, new EmployeeBiz().GetStaticDetail(gvCaption, searchParam, param1, param2, param3, param4, false, "Export"), "StaticsData.xls");
        }
        protected void btnExcelAll_Click(object sender, EventArgs e)
        {
            ExcelUtility.ExportDsToXls(this, new EmployeeBiz().GetStaticDetail(gvCaption, searchParam, param1, param2, param3, param4, true, "Export"), "StaticsDataAll.xls");
        }

    }
}